<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page language="java" errorPage="/html/erro.jsp" %>
     <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
     <%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path=request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>

<link href="<%=path%>/css/botao.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/menu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/js/menu.js"></script>
<script type="text/javascript" src="<%=path%>/js/funcoes.js"></script>

</head>

<body onload="DataHora();">





	<div id="tudo">
		<div id="logo"></div>

		<c:import url="/html/menu.jsp"/>
		<!-- inicio conteudo  
 -->
		<div class="conteudo">
		
 <c:if test="${mensagem!=null }">
 <p style="color: red;text-align: center;">${mensagem }</p>
 <%session.removeAttribute("mensagem"); %>
 </c:if>

		<form action="/sga/Servlet" method="post" id="table-login" style="text-align: center;padding-top: 15px;" >
 
 <input type="hidden" name="classe" value="UsuarioControl"/>
 <input type="hidden" name="acao" value="pesquisar"/>
<!--  <input type="hidden" name="acao" value="UsuarioControl.pesquisar"/> -->
 <input type="hidden" name="destino" value="/html/adm/usuariolista.jsp"/>
 
  <table align="center"><tr><td>
			<input type="button" class="botao-pesquisar" value="Filtro" onclick="this.style.display='none';document.getElementById('filtro').style.display='block';"/>
			</td></tr>
			<tr><td>
 
 <table align="center" style="display: none;" id="filtro">
 <tr>
 	<td>Login:
 	<input type="text" style="margin-left: 5px;" name="login" id="login" class="edit" ></input>
 	</td>
 </tr>
 	<tr>
 		<td>Nome:
 			 <c:if test="${usuarioBusca.nome!=null }">
 		  		<input type="text" style="margin-left: 5px;" name="nome" id="nome" class="edit" value="${usuarioBusca.nome }"></input>
	 		 </c:if>
 			 <c:if test="${usuarioBusca.nome==null }">
 				  <input type="text" style="margin-left: 5px;" name="nome" id="nome" class="edit" ></input>
 		 	</c:if>
 		</td>
 	</tr>
  	<tr>
 		<td>
 			<input type="submit" value="Pesquisar" class="botao-pesquisar" onclick="document.getElementById('paginaAtual').value=1"/>
 			 	
 			limpar naum funcionar
 			<input type="button" value="Limpar" class="botao-limpar" onclick="apagaTextoById('nome');apagaTextoById('idusuario');"/>
 		</td>
 	</tr>
 </table>
 </td></tr></table>
 
 
 
 
 
 
 
 <c:if test="${usuarios!=null }">
 
<table class="table-lista" border="0" align="center">
<tr class="tr1">

<td>Nome</td><td>Email</td><td>Login</td> <td>Excluir</td>
</tr>

<c:forEach var="usuarios" items="${usuarios}" varStatus="cont">
<c:if test="${cont.count % 2==0}">
<tr  class="tr2"> 
</c:if>
<c:if test="${ cont.count % 2!=0}">
<tr  class="tr3">
</c:if>
<td>${usuarios.nome }</td>
<td>
<a href="mailto:${usuarios.email }">${usuarios.email }</a>
</td>

<td>${usuarios.login }</td>

<td>
<a href="" onclick="setHref(this,'<%=path%>/Servlet?classe=UsuarioControl&acao=excluir&destino=/html/adm/usuariolista.jsp&idusuario=${usuarios.id }');">
<%-- <a href="" onclick="setHref(this,'<%=path%>/Servlet?acao=UsuarioControl.excluir&destino=/html/adm/usuariolista.jsp&idusuario=${usuarios.id }');"> --%>
<img src="<%=path%>/img/excluir.png"/>
</a>
</td>

</tr>
</c:forEach>
</table>


<c:import url="/html/paginacao.jsp"  >
<c:param name="count" value="${count}"/>
<c:param name="paginaAtual" value="${paginaAtual}"/>
</c:import>


 </c:if>

 
</form>
		





		</div>
		<!-- fim conteudo  
 -->
		<c:import url="/html/rodape.jsp"/>
	</div>
</body>
</html>
